home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / include / oldsprite.h < prev    next >
C/C++ Source or Header  |  1989-06-23  |  2KB  |  89 lines

  1. /*
  2.  * sprite.h --
  3.  *
  4.  * Common constants and type declarations for Sprite.
  5.  *
  6.  * Copyright 1985, 1988 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  * $Header: /sprite/src/lib/include/RCS/sprite.h,v 1.5 89/06/23 11:29:58 rab Exp $ SPRITE (Berkeley)
  16.  */
  17.  
  18. #ifndef _SPRITE
  19. #define _SPRITE
  20.  
  21. /*
  22.  * A boolean type is defined as an integer, not an enum. This allows a
  23.  * boolean argument to be an expression that isn't strictly 0 or 1 valued.
  24.  */
  25.  
  26. typedef int Boolean;
  27. #ifndef TRUE
  28. #define TRUE    1
  29. #endif
  30. #ifndef FALSE
  31. #define FALSE    0
  32. #endif
  33.  
  34. /*
  35.  * Functions that must return a status can return a ReturnStatus to
  36.  * indicate success or type of failure.
  37.  */
  38.  
  39. typedef int  ReturnStatus;
  40.  
  41. /*
  42.  * The following statuses overlap with the first 2 generic statuses 
  43.  * defined in status.h:
  44.  *
  45.  * SUCCESS            There was no error.
  46.  * FAILURE            There was a general error.
  47.  */
  48.  
  49. #define    SUCCESS            0x00000000
  50. #define    FAILURE            0x00000001
  51.  
  52.  
  53. /*
  54.  * A nil pointer must be something that will cause an exception if 
  55.  * referenced.  There are two nils: the kernels nil and the nil used
  56.  * by user processes.
  57.  */
  58.  
  59. #define NIL         0xFFFFFFFF
  60. #define USER_NIL     0
  61. #ifndef NULL
  62. #define NULL         0
  63. #endif
  64.  
  65. /*
  66.  * An address is just a pointer in C.  It is defined as a character pointer
  67.  * so that address arithmetic will work properly, a byte at a time.
  68.  */
  69.  
  70. typedef char *Address;
  71.  
  72. /*
  73.  * ClientData is an uninterpreted word.  It is defined as an int so that
  74.  * kdbx will not interpret client data as a string.  Unlike an "Address",
  75.  * client data will generally not be used in arithmetic.
  76.  */
  77.  
  78. #ifndef _CLIENTDATA
  79. typedef int *ClientData;
  80. #define _CLIENTDATA
  81. #endif
  82.  
  83. #ifndef __STDC__
  84. #define volatile
  85. #define const
  86. #endif
  87.  
  88. #endif /* _SPRITE */
  89.